<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- <script src="js/index.js"></script> -->
    <title>登录</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        .title {
            margin-bottom: 20px;
            background: #359374;
            width: 100%;
            height: 150px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 30px;
            color: aliceblue;
        }

        .bd {
            text-align: center;
            width: 500px;
            margin: 50px auto;
            padding: 100px 0 65px;
            box-shadow: 1px 1px 10px #ccc;
        }

        .bd input {
            margin: 10px 0;
            width: 265px;
            height: 40px;
            border: 1px solid #ccc;
            border-radius: 5px;
            padding: 5px;
            border: 1px solid #ccc;
        }

        .bd label {
            font-size: 16px;
            font-size: 16px;
            padding: 10px;
        }

        button {
            width: 120px;
            height: 40px;
            border: 1px solid #ccc;
            border-radius: 5px;
            background: #359374;
            color: aliceblue;
            cursor: pointer;
            margin-top: 35px;
        }

        @media (max-width: 600px) {
            .bd {
                width: 90%;
                margin: 20px auto;
                padding: 50px 0 35px;
            }

            .bd input {
                width: 80%;
            }
        }

        .av>button {
            text-align: center;
            margin: 10px;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        .fade-in {
            animation: fadeIn 3s ease-in-out;
        }
    </style>
    <script>
        function login() {
            var username = document.getElementById("username").value;
            var password = document.getElementById("password").value;

            if (username === "admin" && password === "123") {
                alert("登陆成功");
                window.location.href = "dashboard.html";
            } else {
                alert("账户或密码错误，请重试...");
            }
        }
        function logis() {
            alert("正在添加功能中");
        }
    </script>

    </script>
</head>

<body class="fade-in">
    <div class="title">
        <h2>欢迎使用</h2>
    </div>
    <form onsubmit="login(); return false;">
        <div class="bd">
            <div>
                <input type="text" id="username" required maxlength="6" placeholder="账户">
            </div>
            <div>
                <input type="password" id="password" required maxlength="10" placeholder="密码">
            </div>
            <div class="av">
                <button onclick="login()">登录</button>
                <button onclick="logis()">找回密码</button>
            </div>
    </form>
    <button><a style="text-decoration: none;" href="./jingxi/index.html">注册</a></button>
    </div>
</body>

</html>